var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/*
 * @Author: HeAo
 * @Date: 2022-09-21 10:49:43
 * @LastEditTime: 2022-09-21 11:09:54
 * @LastEditors: HeAo
 * @Description:
 * @FilePath: \第二阶段\ES6\day07\3-访问修饰符.ts
 * 别乱动！
 */
var Person2 = /** @class */ (function () {
    function Person2(name, age, weight) {
        this.name = name;
        this.age = age;
        this.weight = weight;
    }
    Person2.prototype.foo = function () {
        console.log(this.name);
        console.log(this.age);
        console.log(this.weight);
    };
    return Person2;
}());
var Student2 = /** @class */ (function (_super) {
    __extends(Student2, _super);
    function Student2() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    // constructor(name, age, weight) {
    //   super(name, age, weight)
    // }
    Student2.prototype.bar = function () {
        // super 父类的引用
        // console.log(super.name);
        // console.log(super.age);
        // console.log(super.weight);//子类无法访问父类
        _super.prototype.foo.call(this);
    };
    return Student2;
}(Person2));
var stu2 = new Student2('terry', 12, 90);
// stu2.bar()
// console.log(stu2.name);
stu2.bar();
// console.log(stu2.age);//为什么报错？只能在类和子类中访问
